<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>讲座安排</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />
    <link rel="stylesheet" type="text/css" href="../../css/myDevelop.css" />
</head>
<body>
  <div id="header">
      <div id="back"></div>
      <h3>讲座安排</h3>
  </div>
  <div id="all">
    <div id="lectures">
      <div class="item">
          <div class="title"></div>
          <div class="status"></div>
          <div class="content">
            <div><span>讲座介绍：</span><span class="introduction"></span></div>
            <div><span>讲座讲师：</span><span class="presenter"></span></div>
            <div><span>课程时间：</span><span class="time"></span></div>
            <div><span>学生主体：</span><span>学生</span></div>
          </div>
      </div>
      <div class="detail">
          <div class="title">讲座课程</div>
          <!-- <div class="item">
            <div><span>时间：</span><span>2019-11-01</span></div>
            <div><span>时间备注：</span><span>第五周星期三</span></div>
            <div><span>课程主题：</span><span>互联网技术</span></div>
            <div><span>教室：</span><span>三教201</span></div>
            <div><span>代表公司和主讲人：</span><span>广西犇云科技有限公司</span></div>
          </div>
          <div class="item">
            <div><span>时间：</span><span>2019-11-01</span></div>
            <div><span>时间备注：</span><span>第五周星期三</span></div>
            <div><span>课程主题：</span><span>互联网技术</span></div>
            <div><span>教室：</span><span>三教201</span></div>
            <div><span>代表公司和主讲人：</span><span>广西犇云科技有限公司</span></div>
          </div>
          <div class="item">
            <div><span>时间：</span><span>2019-11-01</span></div>
            <div><span>时间备注：</span><span>第五周星期三</span></div>
            <div><span>课程主题：</span><span>互联网技术</span></div>
            <div><span>教室：</span><span>三教201</span></div>
            <div><span>代表公司和主讲人：</span><span>广西犇云科技有限公司</span></div>
          </div> -->
      </div>
    </div>
  </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/jquery.js"></script>
<script type="text/javascript">
apiready=function(){
  var flag=$api.getStorage('flag');
  var aid=$api.getStorage('aid');
  var status=api.pageParam.status;
  var introduction=api.pageParam.introduction;
  var presenter=api.pageParam.presenter;
  var time=api.pageParam.time;
  var title=api.pageParam.title;
  var thisId=api.pageParam.thisId;
  $api.dom('.status').innerHTML=status;
  $api.dom('.introduction').innerHTML=introduction;
  $api.dom('.presenter').innerHTML=presenter;
  $api.dom('.time').innerHTML=time;
  $api.dom('.title').innerHTML=title;
  if(status=='进行中'){
    $api.dom('.status').classList.add("doing");
  }else{
    $api.dom('.status').classList.add("end");
  }
  var jwt=$api.getStorage('jwt');
  //查询讲座详细课程
  api.ajax({
    url: 'http://47.104.170.122/v1/portal/training/student/lectureCourses/'+thisId+'?token='+jwt,
    method: 'GET',
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Headers": "Authorization",
      "Content-Type" : 'application/json; charset=utf-8'
    }
  }, function(ret, err) {
    if(ret.code==0){
      $.each(ret.data,function(i,val){
        var templates=`<div class="item">
          <div><span>时间：</span><span>`+getLocalTime(ret.data[i].classTime)+`</span></div>
          <div><span>时间备注：</span><span>`+ret.data[i].timeRemarks+`</span></div>
          <div><span>课程主题：</span><span>`+ret.data[i].theme+`</span></div>
          <div><span>教室：</span><span>`+ret.data[i].classroom+`</span></div>
          <div><span>代表公司和主讲人：</span><span>`+ret.data[i].presenter+`</span></div>
        </div>`;
        $(".detail").append(templates);
      });
    }
  });
}
//jquery
$(function(){
  back();
})
</script>
<script type="text/javascript" src="../../script/main.js"></script>
</html>
